package com.jgame.secondarymarket.domain.product.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jgame.secondarymarket.infrastructure.common.model.entity.BaseEntity;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @title: Product
 * @Author Wangsj
 * @Date: 2021/7/21
 */
@Data
public class ProductBase extends BaseEntity {


    @NotNull(message = "商品价格不能为空")
    @Min(value = 0, message = "商品最低价为0")
    @TableField(value = "price")
    private BigDecimal price;

    @NotNull(message = "商品图片不能为空")
    @TableField(value = "image_address")
    private String imageAddress;

    @TableField(value = "describes")
    private String describes;


}
